home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / nt4.0 server / DRVLIB.NIC / ACCNT / OEMSETUP.INF < prev   
Encoding:
INI File  |  1996-07-31  |  28.6 KB  |  848 lines

  1. [Identification]
  2.     OptionType = NetAdapter
  3. [PlatformsSupported]
  4.     ISA
  5.     EISA
  6.     PCMCIA
  7.     "Jazz-Internal Bus"
  8. [Options]
  9.     ACCNT
  10. ;    ACCNTSOCKETEA
  11. [FileConstants]
  12. UtilityInf      = "UTILITY.INF"
  13. ParamInf        = "NCPARAM.INF"
  14. subroutineinf   = "SUBROUTN.INF"
  15. SoftwareType    = "driver"
  16. Exit_Code       = 0
  17. NetEventDLL     = "%SystemRoot%\System32\netevent.dll"
  18. IoLogMsgDLL     = "%SystemRoot%\System32\IoLogMsg.dll"
  19. Manufacturer    = "Microsoft"
  20. ProductMajorVersion     = "3"
  21. ProductMinorVersion     = "51"
  22. ProductVersion  = $(ProductMajorVersion)"."$(ProductMinorVersion)
  23. ProductSoftwareName     = "ACCNT"
  24. ProductSoftwareImagePath = "\SystemRoot\System32\drivers\accnt.sys"
  25. NetRuleSoftwareType     = "accntSys ndisDriver accntDriver"
  26. NetRuleSoftwareUse      = $(SoftwareType)
  27. NetRuleSoftwareBindForm = """accntSys"" yes no container"
  28. NetRuleSoftwareClass    = {"accntDriver basic"}
  29. NetRuleSoftwareBindable = {"accntDriver accntAdapter non exclusive 100"}
  30. ProductHardwareName     = "ACCNT"
  31. NetRuleHardwareType     = "accnt accntAdapter"
  32. NetRuleHardwareBindForm = " yes yes container"
  33. NetRuleHardwareClass    = {"accntAdapter basic"}
  34. ProductKeyName  = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareName)"\CurrentVersion"
  35. ParamKeyName    = $(!NTN_ServiceBase)"\"$(ProductHardwareName)"\Parameters"
  36. [GeneralConstants]
  37. from      = ""
  38. to        = ""
  39. ExitCodeOk     = 0
  40. ExitCodeCancel = 1
  41. ExitCodeFatal  = 2
  42. KeyNull         = ""
  43. MAXIMUM_ALLOWED   = 33554432
  44. RegistryErrorIndex = NO_ERROR
  45. KeyProduct      = ""
  46. KeyParameters   = ""
  47. TRUE            = 1
  48. FALSE           = 0
  49. NoTitle            = 0
  50. ExitState   = "Active"
  51. OldVersionExisted = $(FALSE)
  52. DriverPath      = $(!STF_NTPATH)\drivers
  53. [date]
  54.     Now = {} ? $(!LIBHANDLE) GetSystemDate
  55. [Identify]
  56.     read-syms Identification
  57.     set Status     = STATUS_SUCCESSFUL
  58.     set Identifier = $(OptionType)
  59.     set Media      = #("Source Media Descriptions", 1, 1)
  60.     Return $(Status) $(Identifier) $(Media)
  61. [ReturnOptions]
  62.     set Status        = STATUS_FAILED
  63.     set OptionList     = {}
  64.     set OptionTextList = {}
  65.     set LanguageList = ^(LanguagesSupported, 1)
  66.     Ifcontains(i) $($0) in $(LanguageList)
  67.     ifstr(i) $($1) == ""
  68.        goto returnoptions
  69.     endif
  70.     set PlatformList = ^(PlatformsSupported, 1)
  71.     Ifcontains(i) $($1) in $(PlatformList)
  72.        goto returnoptions
  73.     else
  74.        set Status = STATUS_NOTSUPPORTED
  75.        goto finish_ReturnOptions
  76.     endif
  77.     else
  78.     set Status = STATUS_NOLANGUAGE
  79.     goto finish_ReturnOptions
  80.     endif
  81. returnoptions = +
  82.     set OptionList     = ^(Options, 1)
  83.     set OptionTextList = ^(OptionsText$($0), 1)
  84.     set Status         = STATUS_SUCCESSFUL
  85. finish_ReturnOptions = +
  86.     Return $(Status) $(OptionList) $(OptionTextList)
  87. [InstallOption]
  88. ;   set !G:DebugOutputControl = 1
  89.     set Option   = $($1)
  90.     set SrcDir   = $($2)
  91.     set AddCopy  = $($3)
  92.     set DoCopy   = $($4)
  93.     set DoConfig = $($5)
  94.     set LanguageList = ^(LanguagesSupported, 1)
  95.     Debug-Output "ACCNT OEMSETUP Installation Start !!! "
  96.     Ifcontains(i) $($0) NOT-IN $(LanguageList)
  97.     Return STATUS_NOLANGUAGE
  98.     endif
  99.     set-subst LF = "\n"
  100.     read-syms GeneralConstants
  101.     read-syms FileConstants
  102.     read-syms DialogConstants$(!STF_LANGUAGE)
  103.     ifstr(i) $(!NTN_Origination) == "NCPA"
  104.     set Continue = $(OK)
  105.     endif
  106.     read-syms FileConstants$(!STF_LANGUAGE)
  107.     detect date
  108.     set-title  $(FunctionTitle)
  109.     set to   = Begin
  110.     set from = Begin
  111.     set CommonStatus = STATUS_SUCCESSFUL
  112.     EndWait
  113. Begin = +
  114.     set ActivateDetection = FALSE
  115.     Ifstr(i) $(!NTN_InstallMode) == deinstall
  116.         set StartLabel = removeadapter
  117.     else-Ifstr(i) $(!NTN_InstallMode) == Update
  118.             set StartLabel = UpgradeSoftware
  119.     else-Ifstr(i) $(!NTN_InstallMode) == bind
  120.         set StartLabel = bindingadapter
  121.     else-Ifstr(i) $(!NTN_InstallMode) == configure
  122.         set CommonStatus = STATUS_REBOOT
  123.         set ActivateDetection = TRUE
  124.         set StartLabel = configureadapter
  125.         Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  126.             Debug-Output "Cannot configure the Novell 2000 driver software."
  127.             Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  128.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  129.                 Debug-Output "ShellCode error: cannot get an error string."
  130.                 goto ShellCodeError
  131.             endif
  132.             set Error = $($R0)
  133.             set from = end
  134.             set to = end
  135.             goto nonfatalinfo
  136.         endif
  137.     else
  138.         set StartLabel = installadapter
  139.         set OEM_ABANDON_OPTIONS = {}
  140.         set OEM_ABANDON_SOFTWARE = FALSE
  141.         set OEM_ABANDON_ON = TRUE
  142.         set ActivateDetection = TRUE
  143.     endif
  144.     Debug-Output "OEMNADN2.INF: =================================================="
  145.     Debug-Output "OEMNADN2.INF: STF_CWDIR is: "$(!STF_CWDIR)
  146.     Debug-Output "OEMNADN2.INF: STF_LANGUAGE is: "$(!STF_LANGUAGE)
  147.     Debug-Output "OEMNADN2.INF: Option is: "$(Option)
  148.     Debug-Output "OEMNADN2.INF: !STF_NCDETECT  is: "$(!STF_NCDETECT)
  149.     Debug-Output "OEMNADN2.INF: !STF_NCOPTION  is: "$(!STF_NCOPTION)
  150.     Debug-Output "OEMNADN2.INF: !STF_NCDETCARD is: "$(!STF_NCDETCARD)
  151.     Debug-Output "OEMNADN2.INF: !STF_NCDETINFO is: "$(!STF_NCDETINFO)
  152.     Debug-Output "OEMNADN2.INF: =================================================="
  153.     Set DetectedCard = FALSE
  154.     set PCMCIA = 0
  155.     set CardType = 0
  156.     Ifstr(i) $(ActivateDetection) != TRUE
  157.     Goto skipdetection
  158.     Endif
  159. ;    Set TypeList = {{IRQ,IRQList,IRQValue},+
  160. ;                    {PCMCIA, PCMCIAList, PCMCIA},+
  161. ;                    {IOADDR, IOBaseAddrDecList, IOBaseAddrValue}}
  162. ;    Debug-Output "OEMNADN2.INF: Calling Param_BuildTypeLists"
  163. ;    Shell $(ParamInf) Param_BuildTypeLists $(Option) $(TypeList)
  164. ;    Set Status = $($R0)
  165. ;    ifstr(i) $(Status) != STATUS_SUCCESSFUL
  166. ;        Goto fataldetect
  167. ;    Endif
  168. ;    Debug-Output "OEMNADN2.INF: Calling Param_SetDefaults"
  169. ;    Shell $(ParamInf) Param_SetDefaults {}
  170. ;    Shell $(ParamInf) HexListFromDecList $(IOBaseAddrDecList)
  171. ;    Set IOBaseAddrHexList = $($R0)
  172. ;;   Set IOBaseAddrHexList = {0x300,0x320,0x340,0x360,0x380,0x3A0,0x3C0,0x3E0,0x200,0x220,0x240,0x260,0x280,0x2A0,0x2C0,0x2E0}
  173. ;    Shell $(UtilityInf) SortList $(IRQList) TRUE FALSE
  174. ;    Set IRQList = $($R0)
  175. ;;   Set IRQList = {3,4,5,9,10,11,12,15}
  176. ;    Ifstr(i) $(!STF_NCDETECT) == YES
  177. ;        Ifstr(i) $(!STF_NCOPTION) == $(Option)
  178. ;           Set DetectedCard = TRUE
  179. ;           Debug-Output "OEMNADN2.INF: Setting DetectedCard to TRUE"
  180. ;        Endif
  181. ;    Endif
  182.  
  183.    Set TypeList = {{IRQ,IRQList,IRQValue},+
  184.            {IOADDR, IOBaseAddrDecList, IOBaseAddrValue}}
  185.    Set IRQList = {3,4,5,9,10,11,12,15}
  186.    Set IOBaseAddrDecList = {768,800,832,864,896,928,968,992,512,544,576,608,640,672,704,736}
  187.    Set IOBaseAddrHexList = {0x300,0x320,0x340,0x360,0x380,0x3A0,0x3C0,0x3E0,0x200,0x220,0x240,0x260,0x280,0x2A0,0x2C0,0x2E0}
  188.    Set !STF_NC_PARAMS = {{IRQ, 1, 80, { 3, 4, 5, 9, 10, 11, 12, 15}},+
  189.              {IOADDR, 1, 100, {768,800,832,864,896,928,968,992,512,544,576,608,640,672,704,736}}}
  190.    Set !STF_NC_PNAMES = {{IRQ, IRQValue, 3}, {IOADDR, IOBaseAddrValue, 768}}
  191.    Shell $(ParamInf) Param_SetDefaults {}
  192.    Set (!STF_NCOPTION) = $(Option)
  193.    Ifstr(i) $(!STF_NCDETECT) == YES
  194.        Ifstr(i) $(!STF_NCOPTION) == $(Option)
  195.       Set DetectedCard = TRUE
  196.       Debug-Output "OEMNADN2.INF: Setting DetectedCard to TRUE"
  197.        Endif
  198.    Endif
  199.    Debug-Output "Install #1"
  200. skipdetection =+
  201.     set from = $(fatal)
  202.     set to = $(fatal)
  203.     goto $(StartLabel)
  204. installadapter = +
  205.    Debug-Output "Install #2"
  206.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  207.     Ifstr $(KeyProduct) != $(KeyNull)
  208.     CloseRegKey $(KeyProduct)
  209.     ifstr(i) !(NTN_RegBase) == $(ProductKeyName)
  210.        Shell $(UtilityInf), VerExistedDlg, $(ProductSoftware$(Option)Title),+
  211.            $(ProductVersion)
  212.        ifint $($ShellCode) != $(!SHELL_CODE_OK)
  213.            Debug-Output "ShellCode error: cannot get an error string."
  214.            goto ShellCodeError
  215.        endif
  216.        goto end
  217.     else
  218.        Shell $(UtilityInf), CardExistedDlg
  219.        ifint $($ShellCode) != $(!SHELL_CODE_OK)
  220.            Debug-Output "ShellCode error: cannot get an error string."
  221.            goto ShellCodeError
  222.        endif
  223.        ifstr(i) $($R1) != "OK"
  224.            set CommonStatus = STATUS_USERCANCEL
  225.            goto end
  226.        endif
  227.        set OldVersionExisted = $(TRUE)
  228.     endif
  229.     endif
  230.    Debug-Output "Install #3"
  231.     Ifstr(i) $(DetectedCard) != TRUE
  232.     Goto adaptersetup
  233.     Endif
  234.     StartWait
  235.     Shell $(ParamInf) Param_QueryCard $(!STF_NCDETCARD)
  236.     EndWait
  237.     Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  238.     Goto adaptersetup
  239.     Endif
  240.    Debug-Output "Install #4"
  241.     Set DetectedParams = $($R1)
  242.     Debug-Output "OEMNADN2.INF: Calling Param_SetDefaults to merge detected params"
  243.     Shell $(ParamInf) Param_SetDefaults $(DetectedParams)
  244.     goto adapteroptions
  245. configureadapter = +
  246.    Debug-Output "Install #5"
  247.     Ifstr $(KeyProduct) == $(KeyNull)
  248.     OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) KeyProduct
  249.     Ifstr $(KeyProduct) == $(KeyNull)
  250.         set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  251.         Debug-Output "Cannot find component product key"
  252.         goto fatalregistry
  253.     Endif
  254.     Endif
  255.    Debug-Output "Install #6"
  256.     Debug-Output "INF: Shelling to FindService"
  257.     Shell $(UtilityInf) FindService, $(KeyProduct)
  258.     Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  259.     Debug-Output "INF: FindService shell failure"
  260.     Goto ShellCodeError
  261.     Endif
  262.    Debug-Output "Install #7"
  263.     Ifstr(i) $($R0) != NO_ERROR
  264.     Debug-Output "INF: FindService Shell error: "$($R0)
  265.     Goto fatalregistry
  266.     endif
  267.     set KeyParameters = $($R2)
  268.     CloseRegKey $($R1)
  269.     Ifstr $(KeyParameters) == $(KeyNull)
  270.     set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  271.     Debug-Output "Cannot find component service"
  272.     goto fatalregistry
  273.     endif
  274.    Debug-Output "Install #8"
  275.     set OldVersionExisted = $(TRUE)
  276.     set ValueName = ""
  277.     set ValueData = ""
  278.     set ValueStr  = ""
  279.     set ValueList = {}
  280.     EnumRegValue $(KeyParameters) ValueList
  281.    Debug-Output "Install #9"
  282.     ForListDo $(ValueList)
  283.     set ValueItem = $($)
  284.     set ValueName = *($(ValueItem),1)
  285.     set ValueData = *($(ValueItem),4)
  286.     Ifstr(i) $(ValueName) == "InterruptNumber"
  287.         set IRQValue = $(ValueData)
  288.     else-ifstr(i) $(ValueName) == "IoBaseAddress"
  289.         set IOBaseAddrValue = $(ValueData)
  290.     else-ifstr(i) $(ValueName) == "BusType"
  291.         set BusInterfaceType = $(ValueData)
  292.     else-ifstr(i) $(ValueName) == "PCMCIA"
  293.         set PCMCIA = $(ValueData)
  294.     else-ifstr(i) $(ValueName) == "BusNumber"
  295.         set BusNumber = $(ValueData)
  296.     endif
  297.     EndForListDo
  298.     ifstr(i) $(IRQValue) == ""
  299.     set IRQValue = *($(IRQList), 2)
  300.     endif
  301.     ifstr(i) $(IOBaseAddrValue) == ""
  302.     set IOBaseAddrValue = *($(IOBaseAddrDecList), 1)
  303.     endif
  304.    Debug-Output "Install #10"
  305. adaptersetup =+
  306.     Shell $(ParamInf) Param_ParameterConfidence
  307.     Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  308.     Debug-Output "OEMNADE2.INF: parameter confidence too low to bypass configuration"
  309.     Goto adapteroptions
  310.     Endif
  311.     Ifstr(i) $(DetectedCard) == TRUE
  312.     Ifstr(i) $(!STF_INSTALL_MODE) != CUSTOM
  313.         Goto adapterverify
  314.     Endif
  315.     Endif
  316.     goto adapteroptions
  317. adapteroptions = +
  318.    Debug-Output "Install #11"
  319.     set from = adapteroptions
  320.     ifstr(i) $(!STF_GUI_UNATTENDED) == "YES"
  321.     ifstr(i) $(!AutoNetInterfaceType) != ""
  322.         set BusInterfaceType = $(!AutoNetInterfaceType)
  323.     else
  324.         set BusInterfaceType = 1
  325.     endif
  326.     ifstr(i) $(!AutoNetBusNumber) != ""
  327.         set BusNumber = $(!AutoNetBusNumber)
  328.     else
  329.         set BusNumber = 0
  330.     endif
  331.     goto adapterverify
  332.     endif
  333.    Debug-Output "Install #12"
  334.     set IOBaseAddress = *($(IOBaseAddrHexList), ~($(IOBaseAddrDecList),+
  335.     $(IOBaseAddrValue)))
  336.     read-syms FileDependentDlg$(!STF_LANGUAGE)
  337.     ui start "InputDlg"
  338.     ifstr(i) $(DLGEVENT) == "CONTINUE"
  339.         set IRQValue = $(Combo1Out)
  340.         set IOBaseAddress = $(Combo2Out)
  341.         ui pop 1
  342.     else-ifstr(i) $(DLGEVENT) == "BACK"
  343.         set CommonStatus = STATUS_USERCANCEL
  344.         Debug-Output "Action: exit. Bye."
  345.         ui pop 1
  346.         goto end
  347.     else
  348.         ui pop 1
  349.         Debug-Output "Action: unknown. Bye."
  350.         goto end
  351.     endif
  352.    Debug-Output "Install #13"
  353.     set IOBaseAddrValue = *($(IOBaseAddrDecList), ~($(IOBaseAddrHexList),+
  354.     $(IOBaseAddress)))
  355.     ifstr(i) $(!STF_NCDETINFO) == {}
  356.     ifint $(PCMCIA) != 1
  357.         Shell $(UtilityInf),GetBusTypeDialog,$(ProductHardware$(Option)Description) $(BusInterfaceType) $(BusNumber)
  358.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  359.         Debug-Output "ShellCode error."
  360.         goto ShellCodeError
  361.         endif
  362.         set BusInterfaceType = $($R1)
  363.         set BusNumber = $($R2)
  364.     else
  365.         set BusInterfaceType = 1
  366.         set BusNumber = 0
  367.     endif
  368.     else
  369.     set BusInterfaceType = *($(!STF_NCDETINFO),5)
  370.     set BusNumber = *($(!STF_NCDETINFO),6)
  371.     endif
  372. adapterverify =+
  373.    Debug-Output "Install #14"
  374.     Ifstr(i) $(DetectedCard) != TRUE
  375.     Goto skipoptions
  376.     Endif
  377.     Debug-Output "OEMNADN2.INF: Calling Param_VerifyCard"
  378.     Shell $(ParamInf) Param_VerifyCard $(!STF_NCDETCARD)
  379.     Ifstr(i) $($R0) == STATUS_SUCCESSFUL
  380.     Debug-Output "OEMNADN2.INF: Param_VerifyCard succeeded"
  381.     Goto skipoptions
  382.     Endif
  383.     Set from = adapteroptions
  384.     Set to = skipoptions
  385.     Shell $(UtilityInf),RegistryErrorString,VERIFY_WARNING
  386.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  387.     Debug-Output "ShellCode error: cannot get an error string."
  388.     goto ShellCodeError
  389.     endif
  390.     set Error = $($R0)
  391.     Goto Warning
  392. skipoptions =+
  393.    Debug-Output "Install #15"
  394.     ifint $(OldVersionExisted) == $(TRUE)
  395.     ifstr(i) $(!NTN_InstallMode) == configure
  396.         goto writeparameters
  397.     endif
  398.     endif
  399.     StartWait
  400. ;  set $(SrcDir)= "A:\NT35"
  401. ;  Debug-Output "STF_CWDDIR =" $(!STF_CWDDIR)
  402. ;  Debug-Output "SrcDir =" $(SrcDir)
  403.     ifint $(OldVersionExisted) == $(FALSE)
  404.     ifstr(i) $(!NTN_InstallMode) == "install"
  405.         Ifstr(i) $(DoCopy) == "YES"
  406.             Shell $(UtilityInf),DoAskSource,$(!STF_CWDDIR),$(SrcDir) YES
  407.              Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  408.             Goto ShellCodeError
  409.             Else-Ifstr(i) $($R0) == STATUS_FAILED
  410.             Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  411.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  412.                goto ShellCodeError
  413.             endif
  414.             set Error = $($R0)
  415.             Goto fatal
  416.             Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  417.             Goto successful
  418.             Endif
  419.             Set SrcDir = $($R1)
  420.         Endif
  421.         install "Install-Option"
  422.         ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  423.             Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  424.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  425.             goto ShellCodeError
  426.             endif
  427.             set Error = $($R0)
  428.             goto fatal
  429.         endif
  430.     endif
  431.    Debug-Output "Install #16"
  432.        Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
  433.             $(ProductSoftwareName), +
  434.             $(ProductSoftwareName), +
  435.             $(ProductSoftware$(Option)Title), $(STF_CONTEXTINFNAME), +
  436.             $(ProductSoftwareImagePath), "kernel", "NDIS", {}, "",+
  437.             $(NetEventDLL)
  438.        Set OEM_ABANDON_SOFTWARE = TRUE
  439.        ifint $($ShellCode) != $(!SHELL_CODE_OK)
  440.     Debug-Output "ShellCode error"
  441.     goto ShellCodeError
  442.        endif
  443.        set RegistryErrorIndex = $($R0)
  444.        set KeyProduct      = $($R1)
  445.        Set SoftNetRulesKey = $($R2)
  446.        CloseRegKey $($R3)
  447.        CloseRegKey $($R4)
  448.        CloseRegKey $($R5)
  449.        Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  450.     EndWait
  451.     Debug-Output "Registry error: add software components"
  452.     CloseRegKey $(KeyProduct)
  453.     CloseRegKey $(SoftNetRulesKey)
  454.     goto fatalregistry
  455.        endif
  456.    Debug-Output "Install #17"
  457.        set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  458.            {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  459.            {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  460.            {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftware$(Option)Title)},+
  461.            {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftware$(Option)Description)},+
  462.            {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareName)},+
  463.            {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  464.        Shell  $(UtilityInf), AddValueList, $(KeyProduct), $(NewValueList)
  465.        ifint $($ShellCode) != $(!SHELL_CODE_OK)
  466.     Debug-Output "ShellCode error."
  467.     goto ShellCodeError
  468.        endif
  469.        set RegistryErrorIndex = $($R0)
  470.        Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  471.     EndWait
  472.     Debug-Output "Registry error: add value list."
  473.     CloseRegKey $(KeyProduct)
  474.     CloseRegKey $(SoftNetRulesKey)
  475.     goto fatalregistry
  476.        endif
  477.        set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareType)},+
  478.             {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareUse)}, +
  479.             {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareBindForm)}, +
  480.             {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClass)}, +
  481.             {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareBindable)}, +
  482.             {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  483.        Shell  $(UtilityInf), AddValueList, $(SoftNetRulesKey), $(NewValueList)
  484.        ifint $($ShellCode) != $(!SHELL_CODE_OK)
  485.     Debug-Output "ShellCode error."
  486.     goto ShellCodeError
  487.        endif
  488.        set RegistryErrorIndex = $($R0)
  489.        CloseRegKey $(KeyProduct)
  490.        CloseRegKey $(SoftNetRulesKey)
  491.        Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  492.     EndWait
  493.     Debug-Output "Resgitry error: add value list."
  494.     goto fatalregistry
  495.        endif
  496.     endif
  497.    Debug-Output "Install #18"
  498.     Shell $(UtilityInf), AddHardwareComponent, $(ProductHardwareName),$(STF_CONTEXTINFNAME),$(ProductKeyName)
  499.     ifint $($R4) != -1
  500.         Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$($R4))
  501.     endif
  502.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  503.         Debug-Output "Cannot add hardware component"
  504.         goto ShellCodeError
  505.     endif
  506.     set RegistryErrorIndex = $($R0)
  507.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  508.         EndWait
  509.         Debug-Output "Registry error: add hardware component"
  510.         CloseRegKey $($R1)
  511.         CloseRegKey $($R2)
  512.         CloseRegKey $($R3)
  513.         goto fatalregistry
  514.     endif
  515.     set KeyParameters = $($R3)
  516.     set KeyAdapterRules = $($R2)
  517.     set AdapterNumber = $($R4)
  518.     set NewValueList = {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
  519.                {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardware$(Option)Title)},+
  520.                {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardware$(Option)Description)},+
  521.                {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
  522.                {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  523.                {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  524.     Shell  $(UtilityInf), AddValueList, $($R1), $(NewValueList)
  525.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  526.         Debug-Output "ShellCode error"
  527.         goto ShellCodeError
  528.     endif
  529.    Debug-Output "Install #19"
  530.     CloseRegKey $($R1)
  531.     set TempProdName = """"$(ProductHardwareName)$(AdapterNumber)""""
  532.     set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm)
  533.     set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleHardwareType)},+
  534.             {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
  535.             {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardwareClass)}, +
  536.             {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  537.     Shell  $(UtilityInf), AddValueList, $(KeyAdapterRules), $(NewValueList)
  538.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  539.         Debug-Output "ShellCode error."
  540.         goto ShellCodeError
  541.     endif
  542.     set RegistryErrorIndex = $($R0)
  543.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  544.         EndWait
  545.         Debug-Output "Resgitry error: add value list."
  546.         CloseRegKey $(KeyParameters)
  547.         CloseRegKey $(KeyAdapterRules)
  548.         goto fatalregistry
  549.     endif
  550.     CloseRegKey $(KeyAdapterRules)
  551.     goto writeparameters
  552.    Debug-Output "Install #20"
  553. writeparameters = +
  554.     ifint $(BusInterfaceType) == 8
  555.     set PCMCIA = 1
  556.     set BusInterfaceType = 1
  557.     endif
  558.     set NewValueList = {{InterruptNumber,$(NoTitle),$(!REG_VT_DWORD),$(IRQValue)},+
  559.                {BusType,$(NoTitle),$(!REG_VT_DWORD),$(BusInterfaceType)},+
  560.                {BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNumber)},+
  561.                {MediaType,$(NoTitle),$(!REG_VT_DWORD),1},+
  562.                {CardType,$(NoTitle),$(!REG_VT_DWORD),0},+
  563.                {IoBaseAddress,$(NoTitle),$(!REG_VT_DWORD),$(IOBaseAddrValue)}}
  564.     Shell  $(UtilityInf), AddValueList, $(KeyParameters), $(NewValueList)
  565.     ifint $(PCMCIA) == 1
  566.     set NewValueList = {{Pcmcia,$(NoTitle),$(!REG_VT_DWORD),1}}
  567.     Shell  $(UtilityInf), AddValueList, $(KeyParameters), $(NewValueList)
  568.     else
  569.     DeleteRegValue $(KeyParameters) "Pcmcia"
  570.     endif
  571.     ifstr(i) $(!STF_GUI_UNATTENDED) == "YES"
  572.     Shell $(UtilityInf),AddDefaultNetCardParameters,$(KeyParameters)
  573.     endif
  574.     CloseRegKey $(KeyParameters)
  575.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  576.         Debug-Output "ShellCode error."
  577.         goto ShellCodeError
  578.     endif
  579.    Debug-Output "Install #21"
  580.     set RegistryErrorIndex = $($R0)
  581.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  582.         Debug-Output "Registry error: Add value list"
  583.         goto fatalregistry
  584.     endif
  585.     EndWait
  586.     goto successful
  587. bindingadapter =+
  588.    Debug-Output "Binding"
  589.     set Error = "Binding: Sorry, not yet implemented."
  590.     goto fatal
  591. removeadapter = +
  592.    Debug-Output "Remove"
  593.     Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  594.         Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  595.                 $(ProductSoftwareName)
  596.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  597.                 Debug-Output "ShellCode error"
  598.                 goto ShellCodeError
  599.         endif
  600.         set RegistryErrorIndex = $($R0)
  601.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  602.                 goto fatalregistry
  603.         endif
  604.     else
  605.         Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  606.             $(ProductSoftwareName), $(!NTN_RegBase)
  607.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  608.                 Debug-Output "ShellCode error"
  609.                 goto ShellCodeError
  610.         endif
  611.         set RegistryErrorIndex = $($R0)
  612.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  613.                 goto fatalregistry
  614.         endif
  615.     endif
  616.     goto end
  617. UpgradeSoftware = +
  618.    Debug-Output "Update"
  619.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  620.     Ifstr $(KeyProduct) != $(KeyNull)
  621.     install "Install-Update"
  622.     ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  623.         goto fatal
  624.     endif
  625.     SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
  626.     SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
  627.     CloseRegKey $(KeyProduct)
  628.     else
  629.     goto fatalregistry
  630.     endif
  631.     goto end
  632. successful = +
  633.     goto end
  634. abandon = +
  635.     ForListDo $(OEM_ABANDON_OPTIONS)
  636.     Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  637.         $(ProductSoftwareName), $($)
  638.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  639.         Debug-Output "ShellCode error"
  640.         goto ShellCodeError
  641.     endif
  642.     set RegistryErrorIndex = $($R0)
  643.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  644.         goto fatalregistry
  645.     endif
  646.     EndForListDo
  647.     Ifstr(i) $(OEM_ABANDON_SOFTWARE) == TRUE
  648.     Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  649.         $(ProductSoftwareName), FALSE
  650.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  651.         Debug-Output "ShellCode error"
  652.         goto ShellCodeError
  653.     endif
  654.     set RegistryErrorIndex = $($R0)
  655.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  656.         goto fatalregistry
  657.     endif
  658.     endif
  659.     goto end
  660. warning = +
  661.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  662.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  663.     goto ShellCodeError
  664.     endif
  665.     ifstr(i) $($R1) == "OK"
  666.     goto $(to)
  667.     else-ifstr(i) $($R1) == "CANCEL"
  668.     goto $(from)
  669.     else
  670.     goto "end"
  671.     endif
  672. nonfatalinfo = +
  673.     Set CommonStatus = STATUS_USERCANCEL
  674.     Set Severity = STATUS
  675.     goto nonfatalmsg
  676. nonfatal = +
  677.     Set Severity = NONFATAL
  678.     goto nonfatalmsg
  679. nonfatalmsg = +
  680.     ifstr(i) $(Error) == ""
  681.     Set Severity = NONFATAL
  682.     Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  683.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  684.         goto ShellCodeError
  685.     endif
  686.     set Error = $($R0)
  687.     endif
  688.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
  689.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  690.     goto ShellCodeError
  691.     endif
  692.     ifstr(i) $($R1) == "OK"
  693.     goto $(from)
  694.     else
  695.     goto "end"
  696.     endif
  697. fatalregistry = +
  698.    Debug-Output "Install #22"
  699.     Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  700.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  701.     goto ShellCodeError
  702.     endif
  703.     set Error = $($R0)
  704.     goto fatal
  705. fataldetect = +
  706.    Debug-Output "Install #23"
  707.     Shell $(UtilityInf),RegistryErrorString,CANNOT_DETECT
  708.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  709.     Debug-Output "ShellCode error: cannot get an error string."
  710.     goto ShellCodeError
  711.     endif
  712.     set Error = $($R0)
  713.     Goto fatal
  714. fatal = +
  715.    Debug-Output "Install #24"
  716.     ifstr(i) $(Error) == ""
  717.     Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  718.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  719.         goto ShellCodeError
  720.     endif
  721.     set Error = $($R0)
  722.     endif
  723.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  724.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  725.     goto ShellCodeError
  726.     endif
  727.     goto setfailed
  728. ShellCodeError = +
  729.    Debug-Output "Install #25"
  730.     set DlgType      = "MessageBox"
  731.     set STF_MB_TITLE = $(ShellCodeErrorTitle)
  732.     set STF_MB_TEXT  = $(ShellCodeErrorText)
  733.     set STF_MB_TYPE  = 1
  734.     set STF_MB_ICON  = 3
  735.     set STF_MB_DEF   = 1
  736.     ui start "Error Message"
  737.     goto setfailed
  738. setfailed = +
  739.     set CommonStatus = STATUS_FAILED
  740.     ifstr(i) $(OEM_ABANDON_ON) == TRUE
  741.     set OEM_ABANDON_ON = FALSE
  742.     goto abandon
  743.     endif
  744.     goto end
  745. end = +
  746.     goto term
  747. term = +
  748.     Return $(CommonStatus)
  749. [Install-Option]
  750.    Debug-Output "Install #26"
  751.     set STF_VITAL = ""
  752.     ifstr(i) $(AddCopy) == "YES"
  753.     AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  754.     endif
  755.     ifstr(i) $(DoCopy) == "YES"
  756.        set !STF_NCPA_FLUSH_COPYLIST = TRUE
  757.        CopyFilesInCopyList
  758.     endif
  759.     ifstr(i) $(DoConfig) == "YES"
  760.     endif
  761.     Exit
  762. [Install-Update]
  763. ;  Debug-Output "Install #27"
  764.    set STF_VITAL        = ""
  765.    set STF_OVERWRITE    = "VERIFYSOURCEOLDER"
  766.    AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  767.    exit
  768. [Source Media Descriptions]
  769. ;  Debug-Output "Install #28"
  770.      1  = "Accton EN166x MPX2 PnP Driver Disk" 
  771.  
  772. [Signature]
  773.     FileType = MICROSOFT_DRVLIB_FILE
  774. [GetSignature]
  775.     read-syms Signature
  776.     return $(FileType)
  777.  
  778. [ProductType]
  779. STF_PRODUCT  = Winnt
  780. STF_PLATFORM = I386
  781. ;[Files-Inf]
  782. ;2,      oemsetup.inf,    SIZE=1000,     RENAME=$(!UG_Filename)
  783. ;[Files-ACCNT]
  784. ;19,ACCNT.SYS , SIZE=19456
  785. ;[Files-ACCNTPCMCIA]
  786. ;19,ACCNT.SYS , SIZE=19456
  787. ;[Files-ACCNTSOCKETEA]
  788. ;19,ACCNT.SYS , SIZE=19456
  789.  
  790. [Files-Inf]
  791. 1,      oemsetup.inf,    SIZE=32000,     RENAME=$(!UG_Filename)
  792. [Files-ACCNT]
  793. 1,ACCNT.SYS , SIZE=32000
  794. [Files-ACCNTPCMCIA]
  795. 1,ACCNT.SYS , SIZE=32000
  796. [Files-ACCNTSOCKETEA]
  797. 1,ACCNT.SYS , SIZE=32000
  798.  
  799. [LanguagesSupported]
  800.     ENG
  801. [OptionsTextENG]
  802.     ACCNT               = "Accton EN166x MPX2 PnP Ethernet Adapter"
  803. ;   ACCNTSOCKETEA       = "Accton EN166x MPX2 PnP Ethernet Adapter"
  804. [FileConstantsENG]
  805. ;  Debug-Output "Install #29"
  806. ProCaption   = "Windows NT Setup"
  807. ProCancel    = "Cancel"
  808. ProCancelMsg = "Windows NT Networking is not correctly installed.  "+
  809.            "Are you sure you want to cancel copying files?"
  810. ProCancelCap = "Network Setup Message"
  811. ProText1     = "Copying:"
  812. ProText2     = "To:"
  813. FunctionTitle   = "Accton EN166x Adapter Setup"
  814. ProductSoftwareACCNTDescription      = "Accton EN166x MPX2 PnP Ethernet Adapter Driver"
  815. ProductSoftwareACCNTSOCKETEADescription      = "Accton EN166x MPX2 PnP Ethernet Adapter Driver"
  816. ProductHardwareACCNTDescription        = "Accton EN166x MPX2 PnP Ethernet Adapter"
  817. ProductHardwareACCNTSOCKETEADescription        = "Accton EN166x MPX2 PnP Ethernet Adapter"
  818. ProductSoftwareACCNTTitle    = "Accton EN166x MPX2 PnP Ethernet Adapter Driver"
  819. ProductSoftwareACCNTSOCKETEATitle    = "Accton EN166x MPX2 PnP Ethernet Adapter Driver"
  820. ProductHardwareACCNTTitle      = "Accton EN166x MPX2 PnP Ethernet Adapter"
  821. ProductHardwareACCNTSOCKETEATitle      = "Accton EN166x MPX2 PnP Ethernet Adapter" ShellCodeErrorTitle     = "Error: "$(FunctionTitle)
  822. ShellCodeErrorText      = "Shell Code Error."
  823. [DialogConstantsENG]
  824. Help        = "&Help"
  825. Exit        = "Cancel"
  826. OK          = "OK"
  827. HelpContext = ""
  828. Continue    = "Continue"
  829. Cancel      = "Cancel"
  830. [FileDependentDlgENG]
  831. Label1 = "&IRQ Level:"
  832. Label2 = "I/O &Port Address:"
  833. DlgType = "RadioCombination"
  834. ;DlgTemplate = "ACCNT"
  835. DlgTemplate = "NE2000"
  836. Caption = $(FunctionTitle)
  837. Combo1List = $(IRQList)
  838. Combo1Out  = $(IRQValue)
  839. Combo2List = $(IOBaseAddrHexList)
  840. Combo2Out  = $(IOBaseAddress)
  841. ComboListItemsIn  = {Combo1List, Combo2List}
  842. ComboListItemsOut = {Combo1Out, Combo2Out}
  843. EditTextIn = ""
  844. EditTextLim = ""
  845. CBOptionsGreyed = {}
  846. NotifyFields = {NO, NO}
  847. HelpContext = $(!IDH_DB_OEMNADN2_INS)
  848.